Elf
Elves are one of the ancient and magical peoples of Middle-earth, appearing in The Hobbit as both light-hearted singers and wise, powerful figures. They are divided into different kinds, including the High Elves of the West and the Wood-elves, and their interactions with the dwarves and Bilbo Baggins range from teasing mockery to crucial aid, ultimately playing a decisive role in the quest's resolution and the fate of the Lonely Mountain.
Nature and Kinds of Elves
The Elves are not a single, uniform people. The narrative distinguishes between the High Elves of the West, who "went and lived for ages, and grew fairer and wiser and more learned, and invented their magic and their cunning craft in the making of beautiful and marvellous things," and the Wood-elves, who "lingered in the twilight of our Sun and Moon, but loved best the stars" and wandered in the great forests. The Wood-elves, descended from ancient tribes that never went to Faerie in the West, are described as "more dangerous and less wise" than their High Elven kin. They are not wicked, but their chief fault is a deep distrust of strangers. Their magic is strong, and they are wary, dwelling most often by the edges of woods from which they could escape to hunt or ride under moonlight and starlight. The Elves of Rivendell, under Elrond, represent the nobler, wiser strain, being described as "elf-friends" with ancestors from the strange stories before the beginning of History, and Elrond himself is as "noble and as fair in face as an elf-lord, as strong as a warrior, as wise as a wizard, as venerable as a king of dwarves, and as kind as summer."
Encounters with the Company
The dwarves and Bilbo first encounter Elves in the valley of Rivendell, where they are greeted by a burst of song from the trees. The Elves there are playful and teasing, singing about the travelers' beards and calling Bilbo "delicious" and "most astonishing wonderful." They are described as loving to laugh and sing, and they find the dwarves' seriousness amusing. Dwarves, in turn, "don't get on well with them," thinking them foolish, while the Elves tease them, especially about their beards. This initial encounter is light-hearted, but it establishes a cultural tension. Later, in Mirkwood, the Wood-elves are encountered under very different circumstances. The starving dwarves are lured by the sight of their feasts, only to have the lights vanish and find themselves lost. The Elvenking of Mirkwood, who lives in a great cave, is a powerful ruler with a weakness for treasure, especially silver and white gems. He captures Thorin and the other dwarves, imprisoning them in his dungeons, partly out of distrust and partly because of an ancient quarrel over stolen treasure. The Elvenking's realm is described as a place of magic, with doors that close by enchantment, from which there is no escape for those brought inside.
Role in the Quest and the Battle of Five Armies
Despite their initial imprisonment of the dwarves, the Wood-elves play a crucial role in the story's climax. After the death of Smaug, the Elvenking leads a host of his people to the Lonely Mountain, seeking a share of the treasure. He is described as a lord of a "good and kindly people," and when Bard's messengers find him, he has pity on the homeless Lake-men and turns his march to aid them. He brings his army to the Mountain, and his forces join with the Men of Lake-town to besiege Thorin and his company. When the Goblins and Wargs attack in the Battle of Five Armies, the Elves become a key part of the alliance. The Elvenking and his spearmen and bowmen fight alongside the Men and Dwarves against the common foe. The Elves are the first to charge, their hatred for goblins described as "cold and bitter," and their spears and swords shine with a "gleam of chill flame." The Elvenking himself is present on the southern arm of the Mountain, near Ravenhill, during the battle's fiercest fighting. After the victory, the Elvenking lays the elvish sword Orcrist upon Thorin's tomb, where it is said to gleam ever in the dark if foes approach, ensuring the fortress could not be taken by surprise. He also accepts a gift from Bilbo, a necklace of silver and pearls, and names him "elf-friend and blessed." The Elves then return to their forest, their host sadly lessened but their hearts glad that the northern world would be merrier for many a long day.